package cn.didi.feidi.javabackend.server.user.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2017/7/12.
 */
@Component
public class RedisHttpAddress {

    public static String redisHost;

    @Value("${javabackend.defaultHost}")
    public void setRedisHost(String redisHost){
        RedisHttpAddress.redisHost = redisHost;
    }

    public static String redisPort;

    @Value("${javabackend.port.redis}")
    public void setRedisPort(String redisPort){
        RedisHttpAddress.redisPort = redisPort;
    }

    public static String getRedisHost(){
        return redisHost;
    }


    public static String getRedisPort(){
        return redisPort;
    }

    public static String getUserxxById(){
        return "http://"+RedisHttpAddress.redisHost+":"+RedisHttpAddress.redisPort+"/userxx";
    }

}
